//
// Created by enemy1205 on 2021/9/4.
//

#ifndef TASK_COMMANDPARSER_H
#define TASK_COMMANDPARSER_H
#include <opencv2/core/utility.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <string>
#include <iostream>

class CommandParser {
    cv::CommandLineParser *cmdParser;
    const char *keys;
    void clear();
public:
    CommandParser()=default;
    CommandParser(int, char *argv[]);
    void Init(int, char *argv[]);
    inline bool show() { return this->cmdParser->has("show"); }
    inline std::string input() { return this->cmdParser->get<std::string>("input"); }
    inline bool time() { return this->cmdParser->has("time"); }
    ~CommandParser();
};
#endif //TASK_COMMANDPARSER_H
